<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">  
function confirmDel(param)
{
   if(window.confirm("您确定要删除该管理员信息吗？")){
      document.location="DeleteServlet?id="+param;
}
 }  
</script>
<title>显示</title> 
    <style type="text/css">
            table {
                border: 1px solid pink;
                margin: 0 auto;
            }
            
            td{
                width: 150px;
                border: 1px solid pink;
                text-align: center;
            }
    </style>
</head>
<body>
    <table>
        <tr>
            <td>编号</td>
            <td>帐号</td>
            <td>密码</td>
            <td>操作</td>
        </tr>
        <c:forEach items="${sessionScope.list}" var="item">
            <tr>
                <td>${item.id }</td>
                <td><a href="UpdateServlet1?teacherid=${item.username}">${item.username }</a></td>
                <td>${item.userpwd }</td>
                <td><a onclick="confirmDel(${item.id})">删除</a>|<a href="UpdateServlet?id=${item.id }">修改</a></td>
            </tr>
        </c:forEach>
        <tr>
            <td colspan="6" style="text-align: left;"><a href="add.jsp">添加管理员</a></td>
        </tr>
    </table>
</body>
</html>